home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 7 / Amiga Format AFCD07 (Dec 1996, Issue 91).iso / serious / shareware / programming / emacs-complete / fsf / emacs / info / dired-x (.txt) < prev    next >
GNU Info File  |  1994-08-15  |  47KB  |  918 lines

  1. This is Info file ../info/dired-x, produced by Makeinfo-1.54 from the
  2. input file dired-x.texi.
  3. File: dired-x,  Node: Copyright,  Next: Top,  Prev: (dir),  Up: (dir)
  4.    This documents the "extra" features for Dired Mode for GNU Emacs 19
  5. found in the file `dired-x.el'.
  6.    Copyright (C) 1993, 1994 Free Software Foundation
  7.    Permission is granted to make and distribute verbatim copies of this
  8. manual provided the copyright notice and this permission notice are
  9. preserved on all copies.
  10.    Permission is granted to copy and distribute modified versions of
  11. this manual under the conditions for verbatim copying, provided that
  12. the entire resulting derived work is distributed under the terms of a
  13. permission notice identical to this one.
  14.    Permission is granted to copy and distribute translations of this
  15. manual into another language, under the above conditions for modified
  16. versions, except that this permission notice may be stated in a
  17. translation approved by the Free Software Foundation.
  18.    The file used to create this is called `dired-x.texi', but the
  19. original work that was altered to make that file was called
  20. `dired.texi' written by Sebastian Kremer.
  21. File: dired-x,  Node: Top,  Next: Introduction,  Prev: Copyright,  Up: (dir)
  22. This documents the "extra" features for Dired Mode for GNU Emacs 19
  23. that are provided by the file `dired-x.el'.
  24.    * Based on `dired.texi' by Sebastian Kremer <sk@thp.uni-koeln.de>
  25.    * For `dired-x.el' revision 2
  26.    * Revision of this manual: 2.52 (1994/08/09 16:51:31)
  27.    * Bugs to Lawrence R. Dodd <dodd@roebling.poly.edu>.  *Please* type
  28.      `M-x dired-x-submit-report' to submit a bug report (*Note Bugs::).
  29.    * You can obtain a copy of this package via anonymous ftp in
  30.      /roebling.poly.edu:/pub/packages/dired-x.tar.gz
  31. * Menu:
  32. * Introduction::
  33. * Installation::
  34. * Omitting Files in Dired::
  35. * Local Variables::
  36. * Shell Command Guessing::
  37. * Virtual Dired::
  38. * Advanced Mark Commands::
  39. * Multiple Dired Directories::
  40. * Find File At Point::
  41. * Miscellaneous Commands::
  42. * Bugs::
  43. * Concept Index::
  44. * Command Index::
  45. * Key Index::
  46. * Variable Index::
  47. File: dired-x,  Node: Introduction,  Next: Features,  Prev: Top,  Up: Top
  48. Introduction
  49. ************
  50.    This documents the *extra* features for Dired Mode for GNU Emacs 19.
  51. It is derived from version 1.191 of Sebastian Kremer's `dired-x.el'
  52. and is GNU Emacs v19 compatible.
  53.    In adopting this `dired-x.el' to GNU Emacs v19 some material that has
  54. been incorported into `dired.el' and `dired-aux.el' of the GNU Emacs 19
  55. distribution has been removed and some material was modifed for
  56. agreement with the functions in `dired.el' and `dired-aux.el'.  For
  57. example, the code using `gmhist' history functions was replaced with
  58. code using the mini-buffer history now built into GNU Emacs 19.
  59. Finally, a few other features have been added and a few more functions
  60. have been bound to keys.
  61.    Please note that `dired-x.el' and this texinfo file `dired-x.texi'
  62. are bundled with GNU Emacs versions 19.23 and later.
  63. * Menu:
  64. * Features::
  65. * Technical Details::
  66. File: dired-x,  Node: Features,  Next: Technical Details,  Prev: Introduction,  Up: Introduction
  67. Features
  68. ========
  69.    Some features provided by Dired Extra
  70.   1. Omitting of uninteresting files from dired listing.
  71.           *Note Omitting Files in Dired::
  72.   2. Local variables for dired directories.
  73.           *Note Local Variables::
  74.   3. Guessing shell commands in dired buffers.
  75.           *Note Shell Command Guessing::
  76.   4. Running dired command in non-dired buffers.
  77.           *Note Virtual Dired::
  78.   5. Finding a file mentioned in a buffer
  79.           *Note Find File At Point::
  80.   6. Commands using file marking.
  81.           *Note Advanced Mark Commands::
  82. `dired-x.el' binds some functions to keys in Dired Mode (*Note Key
  83. Index::) and also binds `C-x C-j' and `C-x 4 C-j' *globally* to
  84. `dired-jump' (*Note Miscellaneous Commands::).  It may also bind `C-x
  85. C-f' and `C-x 4 C-f' to `dired-x-find-file' and
  86. `dired-x-find-file-other-window', respectively (*Note Find File At
  87. Point::).
  88. File: dired-x,  Node: Technical Details,  Next: Installation,  Prev: Features,  Up: Introduction
  89. Technical Details
  90. =================
  91.    When loaded this code *redefines* the following functions of GNU
  92. Emacs from `dired.el'
  93.    * `dired-clean-up-after-deletion'
  94.    * `dired-find-buffer-nocreate'
  95.    * `dired-initial-position'
  96.    * `dired-up-directory'
  97. and the following functions from `dired-aux.el'
  98.    * `dired-add-entry'
  99.    * `dired-read-shell-command'
  100.    One drawback is that `dired-x.el' will load `dired-aux.el' as soon
  101. as dired is loaded.  Thus, the advantage of separating out
  102. non-essential dired stuff into `dired-aux.el' and only loading when
  103. necessary will be lost when `dired-x.el' is used.
  104. File: dired-x,  Node: Installation,  Next: Optional Installation Dired Jump,  Prev: Technical Details,  Up: Top
  105. Installation
  106. ************
  107. This manual describes the dired features provided by the file
  108. `dired-x.el'.  To take advantage of these features, you must load the
  109. file and (optionally) set some variables.
  110. In your `.emacs' file in your home directory, or in the system-wide
  111. initialization file `default.el' in the `site-lisp' directory, put
  112.      (add-hook 'dired-load-hook
  113.                (function (lambda ()
  114.                            (load "dired-x")
  115.                            ;; Set dired-x variables here.  For example:
  116.                            ;; (setq dired-guess-shell-gnutar "gtar")
  117.                            ;; (setq dired-omit-files-p t)
  118.                            ;; (setq dired-x-hands-off-my-keys nil)
  119.                            )))
  120. This will load `dired-x.el' when dired is first invoked (for example,
  121. when you first do `C-x d').
  122. * Menu:
  123. * Optional Installation Dired Jump::
  124. * Optional Installation File At Point::
  125. * Special Notes::
  126. File: dired-x,  Node: Optional Installation Dired Jump,  Next: Optional Installation File At Point,  Prev: Installation,  Up: Installation
  127. Optional Installation Dired Jump
  128. ================================
  129.    In order to have `dired-jump' and `dired-jump-other-window' (*Note
  130. Miscellaneous Commands::) work *before* `dired' and `dired-x' have been
  131. properly loaded the user should set-up an autoload for these functions.
  132. In your `.emacs' file put
  133.      ;;; Autoload `dired-jump' and `dired-jump-other-window'.
  134.      ;;; We autoload from FILE dired.el.  This will then load dired-x.el
  135.      ;;; and hence define `dired-jump' and `dired-jump-other-window'.
  136.      (define-key global-map "\C-x\C-j" 'dired-jump)
  137.      (define-key global-map "\C-x4\C-j" 'dired-jump-other-window)
  138.      
  139.      (autoload (quote dired-jump) "dired" "\
  140.      Jump to dired buffer corresponding to current buffer.
  141.      If in a file, dired the current directory and move to file's line.
  142.      If in dired already, pop up a level and goto old directory's line.
  143.      In case the proper dired file line cannot be found, refresh the dired
  144.      buffer and try again." t nil)
  145.      
  146.      (autoload (quote dired-jump-other-window) "dired" "\
  147.      Like \\[dired-jump] (dired-jump) but in other window." t nil)
  148.    Note that in recent releases of GNU Emacs 19 (i.e., 19.25 or later)
  149. the file `../lisp/loaddefs.el' of the Emacs distribution already
  150. contains the proper auto-loading for `dired-jump' so you need only put
  151.      (define-key global-map "\C-x\C-j" 'dired-jump)
  152. in your `.emacs' file in order to have `C-x C-j' work before `dired' is
  153. loaded.
  154. File: dired-x,  Node: Optional Installation File At Point,  Next: Special Notes,  Prev: Optional Installation Dired Jump,  Up: Installation
  155. Optional Installation File At Point
  156. ===================================
  157.    If you choose to have `dired-x.el' bind `dired-x-find-file' over
  158. `find-file' (*Note Find File At Point::), then you will need to set
  159. `dired-x-hands-off-my-keys' and make a call to the function
  160. `dired-x-bind-find-file' in the `dired-load-hook':
  161.      (add-hook 'dired-load-hook
  162.                (function (lambda ()
  163.                            (load "dired-x")
  164.                            ;; Bind dired-x-find-file.
  165.                            (setq dired-x-hands-off-my-keys nil)
  166.                            ;; Make sure our binding preference is invoked.
  167.                            (dired-x-bind-find-file)
  168.                            )))
  169.    Alternatively, you can set the variable *before* `dired-x.el' is
  170. loaded
  171.      (add-hook 'dired-load-hook
  172.                (function (lambda ()
  173.                            ;; Bind dired-x-find-file.
  174.                            (setq dired-x-hands-off-my-keys nil)
  175.                            (load "dired-x")
  176.                            )))
  177. File: dired-x,  Node: Special Notes,  Next: Omitting Files in Dired,  Prev: Optional Installation File At Point,  Up: Installation
  178. Special Notes
  179. =============
  180.    If `dired-x.el' was *not* bundled with the version of GNU Emacs
  181. installed at your site (i.e., not in the default `../lisp' directory)
  182. then you must put the file `dired-x.el' in a directory known to GNU
  183. Emacs.  Examine the variable `load-path' for a list of these
  184. directories.  If you wish to add a new directory on this list of
  185. directories use something like this in your `.emacs' file
  186.      ;;; LOAD PATH
  187.      (setq load-path (append
  188.                       load-path ; default at top
  189.                       (list
  190.                        "/the/directory/where/you/put/dired-x")))
  191. If you wish to put the new directory at the head of the list (where it
  192. will be found first) then you should use instead
  193.      ;;; LOAD PATH
  194.      (setq load-path (append
  195.                       (list
  196.                        "/the/directory/where/you/put/dired-x")
  197.                       load-path)) ; default at bottom
  198.    You must also byte compile the file (for example, hitting `B' in
  199. `dired-mode').  When byte-compiling `dired-x.el' you may get messages
  200. about functions `vm-visit-folder', `Man-notify-when-ready', and
  201. `reporter-submit-bug-report' not being defined.  These are warnings and
  202. should be ignored.
  203. CAUTION: If you are using a version of GNU Emacs earlier than 19.20
  204. than you may have to edit `dired.el'.  The copy of `dired.el' in GNU
  205. Emacs versions earlier than 19.20 incorrectly had the call to
  206. `run-hooks' *before* the call to `provide'.  In such a case, it is
  207. possible that byte-compiling and/or loading dired can cause an infinite
  208. loop.  To prevent this, make sure the line of code
  209.              (run-hooks 'dired-load-hook)
  210. is the *last* executable line in the file `dired.el'.  That is, make
  211. sure it comes *after* the line
  212.              (provide 'dired)
  213. File: dired-x,  Node: Omitting Files in Dired,  Next: Omitting Variables,  Prev: Special Notes,  Up: Top
  214. Omitting Files in Dired
  215. ***********************
  216.    "Omitting" a file means removing it from the directory listing.
  217. Omitting is useful for keeping Dired buffers free of "uninteresting"
  218. files (for instance, auto-save, auxiliary, backup, and revision control
  219. files) so that the user can concentrate on the interesting files.  Like
  220. hidden files, omitted files are never seen by Dired.  Omitting differs
  221. from hiding in several respects:
  222.    * Omitting works on individual files, not on directories; an entire
  223.      directory cannot be omitted (though each of its files could be).
  224.    * Omitting is wholesale; if omitting is turned on for a dired
  225.      buffer, then all uninteresting files listed in that buffer are
  226.      omitted.  The user does not omit (or unomit) files one at a time.
  227.    * Omitting can be automatic; uninteresting file lines in the buffer
  228.      can be removed before the user ever sees them.
  229.    * Marked files are never omitted.
  230. `M-o'
  231.      (`dired-omit-toggle') Toggle between displaying and omitting
  232.      "uninteresting" files.  With a prefix argument, don't toggle and
  233.      just mark the files, but don't actually omit them.
  234. In order to make Dired Omit work you first need to load `dired-x.el'
  235. inside `dired-load-hook' (*Note Installation::) and then set
  236. `dired-omit-files-p' in some way (*Note Omitting Variables::).
  237. * Menu:
  238. * Omitting Variables::
  239. * Omitting Examples::
  240. * Omitting Technical::
  241. File: dired-x,  Node: Omitting Variables,  Next: Omitting Examples,  Prev: Omitting Files in Dired,  Up: Omitting Files in Dired
  242. Omitting Variables
  243. ==================
  244.    The following variables can be used to customize omitting.
  245. `dired-omit-files-p'
  246.      Default: `nil'
  247.      If non-`nil', "uninteresting" files are not listed.  Uninteresting
  248.      files are those whose filenames match regexp `dired-omit-files',
  249.      plus those ending with extensions in `dired-omit-extensions'.
  250.      `M-o' (`dired-omit-toggle') toggles its value, which is
  251.      buffer-local.  Put
  252.           (setq dired-omit-files-p t)
  253.      inside your `dired-mode-hook' to have omitting initially turned on
  254.      in *every* Dired buffer (*Note Installation::).  You can then use
  255.      `M-o' to unomit in that buffer.
  256.      To enable omitting automatically only in certain directories one
  257.      can use Dired Local Variables and put
  258.           Local Variables:
  259.           dired-omit-files-p: t
  260.           End:
  261.      into a file `.dired' (the default value of
  262.      `dired-local-variables-file') in that directory (*Note Local
  263.      Variables::).
  264.     `dired-omit-here-always'
  265.           This is an interactive function that creates a local
  266.           variables file exactly like the example above (if it does not
  267.           already exist) in the file `dired-local-variables-file' in
  268.           the current directory and then refreshes the directory
  269.           listing (*Note Local Variables::).
  270. `dired-omit-files'
  271.      Default: `"^#\\|\\.$"'
  272.      Filenames matching this buffer-local regexp will not be displayed.
  273.      This only has effect when `dired-omit-files-p' is t.
  274.      The default value omits the special directories `.' and `..'  and
  275.      autosave files (plus other files ending in ".") (*Note Omitting
  276.      Examples::).
  277. `dired-omit-extensions'
  278.      Default: The elements of `completion-ignored-extensions' (as
  279.      defined in the file `loaddefs.el' of the GNU Emacs distribution),
  280.      `dired-latex-unclean-extensions', `dired-bibtex-unclean-extensions'
  281.      and `dired-texinfo-unclean-extensions'.
  282.      If non-`nil', a list of extensions (strings) to omit from Dired
  283.      listings.  Its format is the same as that of
  284.      `completion-ignored-extensions'.
  285. `dired-omit-localp'
  286.      Default:  `'no-dir'
  287.      The LOCALP argument `dired-omit-expunge' passes to
  288.      `dired-get-filename'.  If it is `'no-dir', omitting is much faster,
  289.      but you can only match against the non-directory part of the
  290.      filename.  Set it to `nil' if you need to match the whole pathname
  291.      or `t' to match the pathname relative to the buffer's top-level
  292.      directory.
  293. `dired-omit-marker-char'
  294.      Default: `C-o'
  295.      Temporary marker used by by Dired to implement omitting.  Should
  296.      never be used as marker by the user or other packages.  There is
  297.      one exception to this rule: by doing
  298.           (setq dired-mark-keys "\C-o")
  299.           ;; i.e., the value of dired-omit-marker-char
  300.           ;; (which is not defined yet)
  301.      anywhere in your `~/.emacs', you will bind the `C-o' key to insert
  302.      a `C-o' marker, thus causing these files to be omitted in addition
  303.      to the usually omitted files.  Unfortunately the files you omitted
  304.      manually this way will show up again after reverting the buffer,
  305.      unlike the others.
  306. File: dired-x,  Node: Omitting Examples,  Next: Omitting Technical,  Prev: Omitting Variables,  Up: Omitting Files in Dired
  307. Examples of Omitting Various File Types
  308. =======================================
  309.    * If you wish to avoid seeing RCS files and the RCS directory, then
  310.      put
  311.           (setq dired-omit-files
  312.                 (concat dired-omit-files "\\|^RCS$\\|,v$"))
  313.      in the `dired-load-hook' (*Note Installation::).  This assumes
  314.      `dired-omit-localp' has its default value of `'no-dir' to make the
  315.      `^'-anchored matches work.  As a slower alternative, with
  316.      `dired-omit-localp' set to `nil', you can use `/' instead of `^'
  317.      in the regexp.
  318.    * If you use tib, the bibliography program for use with TeX and
  319.      LaTeX, you might want to omit the `INDEX' and the `-t.tex' files,
  320.      then put
  321.           (setq dired-omit-files
  322.                 (concat dired-omit-files "\\|^INDEX$\\|-t\\.tex$"))
  323.      in the `dired-load-hook' (*Note Installation::).
  324.    * If you do not wish to see `dot' files (files starting with a `.'),
  325.      then put
  326.           (setq dired-omit-files
  327.                 (concat dired-omit-files "\\|^\\..+$"))
  328.      in the `dired-load-hook' (*Note Installation::).
  329. File: dired-x,  Node: Omitting Technical,  Next: Local Variables,  Prev: Omitting Examples,  Up: Omitting Files in Dired
  330. Some Technical Details of Omitting
  331. ==================================
  332.    Loading `dired-x.el' will install Dired Omit by putting
  333. `dired-omit-expunge' on your `dired-after-readin-hook', and will call
  334. `dired-extra-startup', which in turn calls `dired-omit-startup' in your
  335. `dired-mode-hook'.
  336. File: dired-x,  Node: Local Variables,  Next: Shell Command Guessing,  Prev: Omitting Technical,  Up: Top
  337. Local Variables for Dired Directories
  338. *************************************
  339. When Dired visits a directory, it looks for a file whose name is the
  340. value of variable `dired-local-variables-file' (default: `.dired').  If
  341. such a file is found, Dired will temporarily insert it into the Dired
  342. buffer and run `hack-local-variables'.
  343. For example, if the user puts
  344.      Local Variables:
  345.      dired-actual-switches: "-lat"
  346.      dired-omit-files-p: t
  347.      End:
  348. into a file called `.dired' in a directory then when that directory is
  349. viewed it will be
  350.   1. sorted by date
  351.   2. omitted automatically
  352. You can set `dired-local-variables-file' to `nil' to suppress this.
  353. The value of `dired-enable-local-variables' controls if and how these
  354. local variables are read.  This variable exists so that if may override
  355. the default value of `enable-local-variables'.
  356. Please see the GNU Emacs Manual to learn more about local variables.
  357. *Note Local Variables in Files: (emacs)File Variables.
  358. The following variables affect Dired Local Variables
  359. `dired-local-variables-file'
  360.      Default: `".dired"'
  361.      If non-`nil', filename for local variables for Dired.  If Dired
  362.      finds a file with that name in the current directory, it will
  363.      temporarily insert it into the dired buffer and run
  364.      `hack-local-variables'.
  365. `dired-enable-local-variables'
  366.      Default: `t'
  367.      Controls use of local-variables lists in dired.  The value can be
  368.      `t', `nil', or something else.  A value of `t' means
  369.      local-variables lists are obeyed in the
  370.      `dired-local-variables-file'; `nil' means they are ignored;
  371.      anything else means query.  This variable temporarily overrides
  372.      the value of `enable-local-variables' when the Dired Local
  373.      Variables are hacked.
  374. File: dired-x,  Node: Shell Command Guessing,  Next: Virtual Dired,  Prev: Local Variables,  Up: Top
  375. Shell Command Guessing
  376. **********************
  377.    Based upon the name of a filename, Dired tries to guess what shell
  378. command you might want to apply to it.  For example, if you have point
  379. on a file named `foo.tar' and you press `!', Dired will guess you want
  380. to `tar xvf' it and suggest that as the default shell command.
  381.    The default will be mentioned in brackets and you can type `M-p' to
  382. get the default into the minibuffer so that you can edit it, e.g.,
  383. changing `tar xvf' to `tar tvf'.  If there are several commands for a
  384. given file, e.g., `xtex' and `dvips' for a `.dvi' file, you can type
  385. `M-p' several times to see each of the matching commands.
  386.    Dired only tries to guess a command for a single file, never for a
  387. list of marked files.
  388. `dired-guess-shell-alist-default'
  389.      Predefined rules for shell commands.  Set this to `nil' to turn
  390.      guessing off.  The elements of `dired-guess-shell-alist-user'
  391.      (defined by the user) will override these rules.
  392. `dired-guess-shell-alist-user'
  393.      If non-`nil', a user-defined alist of file regexps and their
  394.      suggested commands.  These rules take precedence over the
  395.      predefined rules in the variable `dired-guess-shell-alist-default'
  396.      (to which they are prepended) when `dired-do-shell-command' is
  397.      run).
  398.      Each element of the alist looks like
  399.           (REGEXP COMMAND...)
  400.      where each COMMAND can either be a string or a lisp expression
  401.      that evaluates to a string.  If several COMMANDs are given, all
  402.      will temporarily be pushed on the history.
  403.      You can set this variable in your `~/.emacs'.  For example, to add
  404.      rules for `.foo' and `.bar' file extensions, write
  405.           (setq dired-guess-shell-alist-user
  406.                 (list
  407.                  (list "\\.foo$" "FOO-COMMAND");; fixed rule
  408.                  ;; possibly more rules...
  409.                  (list "\\.bar$";; rule with condition test
  410.                         '(if CONDITION
  411.                              "BAR-COMMAND-1"
  412.                            "BAR-COMMAND-2"))))
  413.      This will override any predefined rules for the same extensions.
  414. `dired-guess-shell-gnutar'
  415.      Default: `nil'
  416.      If non-`nil', name of the GNU tar executable (e.g., `"tar"' or
  417.      `"gnutar"').  GNU tar's `z' switch is used for compressed tar
  418.      files.  If you don't have GNU tar, set this to `nil': a pipe using
  419.      `zcat' is then used.
  420. `dired-guess-shell-gzip-quiet'
  421.      Default: `t'
  422.      A non-`nil' value means that `-q' is passed to gzip overriding a
  423.      verbose GNU zip's `GZIP' environment variable.
  424. `dired-guess-shell-znew-switches nil'
  425.      Default: `nil'
  426.      A string of switches passed to GNU zip's `znew'.  An example is
  427.      `"-K"' which will make `znew' keep a .Z file when it is smaller
  428.      than the .gz file.
  429. `dired-shell-command-history nil'
  430.      History list for commands that read dired-shell commands.
  431. File: dired-x,  Node: Virtual Dired,  Next: Advanced Mark Commands,  Prev: Shell Command Guessing,  Up: Top
  432. Virtual Dired
  433. *************
  434.    Using "Virtual Dired" means putting a buffer with Dired-like
  435. contents in Dired mode.  The files described by the buffer contents need
  436. not actually exist.  This is useful if you want to peruse an `ls -lR'
  437. output file, for example one you got from an FTP server.  You can use
  438. all motion commands usually available in Dired.  You can also use it to
  439. save a Dired buffer in a file and resume it in a later session.
  440.    Type `M-x dired-virtual' to put the current buffer into virtual
  441. Dired mode.  You will be prompted for the top level directory of this
  442. buffer, with a default value guessed from the buffer contents.  To
  443. convert the virtual to a real Dired buffer again, type `g' (which calls
  444. `dired-virtual-revert') in the virtual Dired buffer and answer `y'.
  445. You don't have to do this, though: you can relist single subdirectories
  446. using `l' (`dired-do-redisplay') on the subdirectory headerline,
  447. leaving the buffer in virtual Dired mode all the time.
  448.    The function `dired-virtual-mode' is specially designed to turn on
  449. virtual Dired mode from the `auto-mode-alist'.  To edit all `*.dired'
  450. files automatically in virtual Dired mode, put this into your
  451. `~/.emacs':
  452.      (setq auto-mode-alist (cons '("[^/]\\.dired$" . dired-virtual-mode)
  453.                                    auto-mode-alist))
  454.    The regexp is a bit more complicated than usual to exclude ".dired"
  455. local variable files.
  456. File: dired-x,  Node: Advanced Mark Commands,  Next: Advanced Cleaning Functions,  Prev: Virtual Dired,  Up: Top
  457. Advanced Mark Commands
  458. **********************
  459.      (`dired-do-find-marked-files') Find all marked files at once
  460.      displaying simultaneously.  If optional NOSELECT is non-`nil' then
  461.      just find the files but do not select.  If you want to keep the
  462.      dired buffer displayed, type `C-x 2' first.  If you want just the
  463.      marked files displayed and nothing else, type `C-x 1' first.
  464.      The current window is split across all files marked, as evenly as
  465.      possible.  Remaining lines go to the bottom-most window.  The
  466.      number of files that can be displayed this way is restricted by
  467.      the height of the current window and the variable
  468.      `window-min-height'.
  469. `dired-mark-extension'
  470.      Mark all files with a certain extension for use in later commands.
  471.      A `.' is not automatically prepended to the string entered.
  472.      When called from lisp, EXTENSION may also be a list of extensions
  473.      and an optional argument MARKER-CHAR specifies the marker used.
  474. `dired-flag-extension'
  475.      Flag all files with a certain extension for deletion.  A `.' is
  476.      *not* automatically prepended to the string entered.
  477. * Menu:
  478. * Advanced Cleaning Functions::
  479. * Advanced Cleaning Variables::
  480. * Special Marking Function::
  481. File: dired-x,  Node: Advanced Cleaning Functions,  Next: Advanced Cleaning Variables,  Prev: Advanced Mark Commands,  Up: Advanced Mark Commands
  482. Advanced Cleaning Functions
  483. ===========================
  484. `dired-clean-patch'
  485.      Flag dispensable files created by the `patch' program for
  486.      deletion.  See variable `dired-patch-unclean-extensions'.
  487. `dired-clean-tex'
  488.      Flag dispensable files created by TeX, LaTeX, and `texinfo' for
  489.      deletion.  See the following variables (*Note Advanced Cleaning
  490.      Variables::)
  491.         * `dired-tex-unclean-extensions'
  492.         * `dired-texinfo-unclean-extensions'
  493.         * `dired-latex-unclean-extensions'
  494.         * `dired-bibtex-unclean-extensions'
  495. `dired-very-clean-tex'
  496.      Flag dispensable files created by TeX, LaTeX, `texinfo', and ".dvi"
  497.      files for deletion.
  498. File: dired-x,  Node: Advanced Cleaning Variables,  Next: Special Marking Function,  Prev: Advanced Cleaning Functions,  Up: Advanced Mark Commands
  499. Advanced Cleaning Variables
  500. ===========================
  501. Variables used by the above cleaning commands (and in the default value
  502. for variable `dired-omit-extensions', *Note Omitting Variables::)
  503. `dired-patch-unclean-extensions'
  504.      Default: `'(".rej" ".orig")'
  505.      List of extensions of dispensable files created by the `patch'
  506.      program.
  507. `dired-tex-unclean-extensions'
  508.      Default:  `'(".toc" ".log" ".aux")'
  509.      List of extensions of dispensable files created by TeX.
  510. `dired-texinfo-unclean-extensions'
  511.      Default: `'(".cp" ".cps" ".fn" ".fns" ".ky" ".kys"' `".pg" ".pgs"
  512.      ".tp" ".tps" ".vr" ".vrs")'
  513.      List of extensions of dispensable files created by `texinfo'.
  514. `dired-latex-unclean-extensions'
  515.      Default: `'(".idx" ".lof" ".lot" ".glo")'
  516.      List of extensions of dispensable files created by LaTeX.
  517. `dired-bibtex-unclean-extensions'
  518.      Default:  `'(".blg" ".bbl")'
  519.      List of extensions of dispensable files created by BibTeX.
  520. File: dired-x,  Node: Special Marking Function,  Next: Multiple Dired Directories,  Prev: Advanced Cleaning Variables,  Up: Advanced Mark Commands
  521. Special Marking Function
  522. ========================
  523. `M-('
  524.      (`dired-mark-sexp') Mark files for which PREDICATE returns
  525.      non-`nil'.  With a prefix argument, unflag those files instead.
  526.      The PREDICATE is a lisp expression that can refer to the following
  527.      symbols:
  528.     `inode'
  529.           [integer] the inode of the file (only for `ls -i' output)
  530.     `s'
  531.           [integer] the size of the file for `ls -s' output (usually in
  532.           blocks or, with `-k', in KBytes)
  533.     `mode'
  534.           [string]  file permission bits, e.g., `"-rw-r--r--"'
  535.     `nlink'
  536.           [integer] number of links to file
  537.     `uid'
  538.           [string]  owner
  539.     `gid'
  540.           [string]  group  (If the gid is not displayed by `ls', this
  541.           will still be set (to the same as uid))
  542.     `size'
  543.           [integer] file size in bytes
  544.     `time'
  545.           [string]  the time that `ls' displays, e.g., `"Feb 12 14:17"'
  546.     `name'
  547.           [string]  the name of the file
  548.     `sym'
  549.           [string]  if file is a symbolic link, the linked-to name,
  550.           else `""'
  551.      For example, use
  552.           (equal 0 size)
  553.      to mark all zero length files.
  554.      To find out all not yet compiled Emacs lisp files in a directory,
  555.      dired all `.el' files in the lisp directory using the wildcard
  556.      `*.el'.  Then use `M-(' with
  557.           (not (file-exists-p (concat name "c")))
  558.      to mark all `.el' files without a corresponding `.elc' file.
  559. File: dired-x,  Node: Multiple Dired Directories,  Next: Find File At Point,  Prev: Special Marking Function,  Up: Top
  560. Multiple Dired Directories and Non-Dired Commands
  561. *************************************************
  562.    An Emacs buffer can have but one working directory, stored in the
  563. buffer-local variable `default-directory'.  A Dired buffer may have
  564. several subdirectories inserted, but still has but one working
  565. directory: that of the top level Dired directory in that buffer.  For
  566. some commands it is appropriate that they use the current Dired
  567. directory instead of `default-directory', e.g., `find-file' and
  568. `compile'.
  569.    A general mechanism is provided for special handling of the working
  570. directory in special major modes:
  571. `default-directory-alist'
  572.      Default: `((dired-mode . (dired-current-directory)))'
  573.      Alist of major modes and their opinion on `default-directory', as a
  574.      lisp expression to evaluate.  A resulting value of `nil' is ignored
  575.      in favor of `default-directory'.
  576. `default-directory'
  577.      Function with usage like variable `default-directory', but knows
  578.      about the special cases in variable `default-directory-alist'.
  579. File: dired-x,  Node: Find File At Point,  Next: Miscellaneous Commands,  Prev: Multiple Dired Directories,  Up: Top
  580. Find File At Point
  581. ==================
  582.    `dired-x' provides a method of visiting or editing a file mentioned
  583. in the buffer you are viewing (e.g., a mail buffer, a news article, a
  584. README file, etc.) or to test if that file exists.  You can then modify
  585. this in the minibuffer after snatching the filename.
  586.    When installed `dired-x' will substitute `dired-x-find-file' for
  587. `find-file' (normally bound to `C-x C-f') and
  588. `dired-x-find-file-other-window' for `find-file-other-window' (normally
  589. bound to `C-x 4 C-f').
  590.    In order to use this feature, you will need to set
  591. `dired-x-hands-off-my-keys' to `nil' inside `dired-load-hook' (*Note
  592. Optional Installation File At Point::).
  593. `dired-x-find-file'
  594.      `dired-x-find-file' behaves exactly like `find-file' (normally
  595.      bound to `C-x C-f') unless a prefix argument is passed to the
  596.      function in which case it will use the filename at point as a
  597.      guess for the file to visit.
  598.      For example, if the buffer you were reading contained the words
  599.           Available via anonymous ftp in
  600.           
  601.              /roebling.poly.edu:/pub/lisp/crypt++.el.gz
  602.      then you could move your cursor to the line containing the ftp
  603.      address and type `C-u C-x C-f' (the `C-u' is a universal
  604.      argument).  The minibuffer would read
  605.           Find file: /roebling.poly.edu:/pub/lisp/crypt++.el.gz
  606.      with the point after the last `/'.  If you hit return emacs will
  607.      visit the file at that address.  This also works with files on
  608.      your own computer.
  609. `dired-x-find-file-other-window'
  610.      `dired-x-find-file-other-window' behaves exactly like
  611.      `find-file-other-window' (normally bound to `C-x 4 C-f') unless a
  612.      prefix argument is used.  See `dired-x-find-file' for more
  613.      information.
  614. `dired-x-hands-off-my-keys'
  615.      If set to `t', then it means that `dired-x' should *not* bind
  616.      `dired-x-find-file' over `find-file' on keyboard.  Similarly, it
  617.      should not bind `dired-x-find-file-other-window' over
  618.      `find-file-other-window'.  If you change this variable after
  619.      `dired-x.el' is loaded then do `M-x dired-x-bind-find-file'.  The
  620.      default value of this variable is `t'; by default, the binding is
  621.      not done.  See *Note Optional Installation File At Point::.
  622. `dired-x-bind-find-file'
  623.      A function, which can be called interactively or in your
  624.      `~/.emacs' file, that uses the value of
  625.      `dired-x-hands-off-my-keys' to determine if `dired-x-find-file'
  626.      should be bound over `find-file' and
  627.      `dired-x-find-file-other-window' bound over
  628.      `find-file-other-window'.  See *Note Optional Installation File At
  629.      Point::.
  630. File: dired-x,  Node: Miscellaneous Commands,  Next: Bugs,  Prev: Find File At Point,  Up: Top
  631. Miscellaneous Commands
  632. **********************
  633.    Miscellaneous features not fitting anywhere else:
  634. `dired-find-subdir'
  635.      Default: `nil'
  636.      If non-`nil', Dired does not make a new buffer for a directory if
  637.      it can be found (perhaps as subdirectory) in some existing Dired
  638.      buffer.
  639.      If there are several Dired buffers for a directory, the most
  640.      recently used is chosen.
  641.      Dired avoids switching to the current buffer, so that if you have a
  642.      normal and a wildcard buffer for the same directory, `C-x d RET'
  643.      will toggle between those two.
  644. `M-g'
  645.      (`dired-goto-file') Goto file line of a file (or directory).
  646. `M-G'
  647.      (`dired-goto-subdir') Goto headerline of an inserted directory.
  648.      This commands reads its argument with completion over the names of
  649.      the inserted subdirectories.
  650.      (`dired-copy-filename-as-kill') The `w' command puts the names of
  651.      the marked (or next N) files into the kill ring, as if you had
  652.      killed them with `C-w'.  With a zero prefix argument N=0, use the
  653.      complete pathname of each file.  With a raw (just `C-u') prefix
  654.      argument, use the relative pathname of each marked file.  As a
  655.      special case, if no prefix argument is given and point is on a
  656.      directory headerline, it gives you the name of that directory,
  657.      without looking for marked files.
  658.      The list of names is also stored onto the variable
  659.      `dired-marked-files' for use, e.g., in an `ESC ESC'
  660.      (`eval-expression') command.
  661.      As this command also displays what was pushed onto the kill ring
  662.      you can use it to display the list of currently marked files in the
  663.      echo area (unless you happen to be on a subdirectory headerline).
  664.      You can then feed the file name to other Emacs commands with `C-y'.
  665.      For example, say you want to rename a long filename to a slightly
  666.      different name.  First type `w' to push the old name onto the kill
  667.      ring.  Then type `R' to rename it and use `C-y' inside `R''s
  668.      minibuffer prompt to insert the old name at a convenient place.
  669.      (`dired-do-toggle') Toggle marks.  That is, currently marked files
  670.      become unmarked and vice versa.  Files marked with other flags
  671.      (such as `D') are not affected.  The special directories `.' and
  672.      `..' are never toggled.
  673. `dired-smart-shell-command'
  674.      Like function `shell-command', but in the current Dired directory.
  675.      Bound to `M-!' in Dired buffers.
  676. `dired-jump'
  677.      Bound to `C-x C-j'.  Jump back to dired: If in a file, dired the
  678.      current directory and move to file's line.  If in Dired already,
  679.      pop up a level and goto old directory's line.  In case the proper
  680.      Dired file line cannot be found, refresh the Dired buffer and try
  681.      again.
  682. `dired-jump-other-window'
  683.      Bound to `C-x 4 C-j'. Like `dired-jump', but to other window.
  684.      These functions can be autoloaded so they work even though
  685.      `dired-x.el' has not been loaded yet (*Note Optional Installation
  686.      Dired Jump::).
  687.      If the variable `dired-bind-jump' is `nil', `dired-jump' will not
  688.      be bound to `C-x C-j' and `dired-jump-other-window' will not be
  689.      bound to `C-x 4 C-j'.
  690. `dired-vm'
  691.      Bound to `V' if `dired-bind-vm' is t.  Run VM on this file (assumed
  692.      to be a UNIX mail folder).
  693.      If you give this command a prefix argument, it will visit the
  694.      folder read-only.  This only works in VM~5, not VM~4.
  695.      If the variable `dired-vm-read-only-folders' is t, `dired-vm' will
  696.      visit all folders read-only.  If it is neither `nil' nor `t', e.g.,
  697.      the symbol `'if-file-read-only', only files not writable by you are
  698.      visited read-only.  This is the recommended value if you run VM 5.
  699.      If the variable `dired-bind-vm' is t, `dired-vm' will be bound to
  700.      `V'.  Otherwise, `dired-bind-rmail' will be bound.
  701. `dired-rmail'
  702.      Bound to `V' if `dired-bind-vm' is `nil'.  Run Rmail on this file
  703.      (assumed to be mail folder in Rmail/BABYL format).
  704. `dired-info'
  705.      Bound to `I'.  Run Info on this file (assumed to be a file in Info
  706.      format).
  707.      If the variable `dired-bind-info' is `nil', `dired-info' will not
  708.      be bound to I.
  709. `dired-man'
  710.      Bound to `N'.  Run man on this file (assumed to be a file in nroff
  711.      format).
  712.      If the variable `dired-bind-man' is `nil', `dired-man' will not be
  713.      bound to N.
  714. `dired-do-relative-symlink'
  715.      Bound to `Y'.  Relative symlink all marked (or next ARG) files
  716.      into a directory, or make a relative symbolic link to the current
  717.      file.  This creates relative symbolic links like
  718.      foo -> ../bar/foo
  719.      not absolute ones like
  720.      foo -> /ugly/path/that/may/change/any/day/bar/foo
  721. `dired-do-relative-symlink-regexp'
  722.      Bound to `%Y'.  Relative symlink all marked files containing
  723.      REGEXP to NEWNAME.  See functions `dired-do-rename-regexp' and
  724.      `dired-do-relsymlink' for more info.
  725. File: dired-x,  Node: Bugs,  Next: Concept Index,  Prev: Miscellaneous Commands,  Up: Top
  726. If you encounter a bug in this package, wish to suggest an enhancement,
  727. or want to make a smart remark, then type
  728.      `M-x dired-x-submit-report'
  729. to set up an outgoing mail buffer, with the proper address to the
  730. `dired-x.el' maintainer automatically inserted in the `To:' field.
  731. This command also inserts information that the Dired X maintainer can
  732. use to recreate your exact setup, making it easier to verify your bug
  733. or social maladjustment.
  734.    Lawrence R. Dodd <dodd@roebling.poly.edu>
  735. File: dired-x,  Node: Concept Index,  Next: Command Index,  Prev: Bugs,  Up: Top
  736. Concept Index
  737. *************
  738. * Menu:
  739. * dired-aux.el:                         Technical Details.
  740. * Adding to the kill ring in dired.:    Miscellaneous Commands.
  741. * Autoloading dired-jump and dired-jump-other-window: Optional Installation Dired Jump.
  742. * Binding dired-x-find-file:            Optional Installation File At Point.
  743. * Bugs:                                 Bugs.
  744. * Dot files, how to omit them in Dired: Omitting Examples.
  745. * Features:                             Features.
  746. * Finding a file at point:              Find File At Point.
  747. * GNU zip.:                             Shell Command Guessing.
  748. * GNU zip.:                             Shell Command Guessing.
  749. * Guessing shell commands for files.:   Shell Command Guessing.
  750. * How to make omitting the default in Dired: Omitting Variables.
  751. * Jumping to dired listing containing file.: Miscellaneous Commands.
  752. * Lisp expression, marking files with in Dired: Special Marking Function.
  753. * Local Variables for Dired Directories: Local Variables.
  754. * ls listings, how to peruse them in Dired: Virtual Dired.
  755. * Mark file by lisp expression:         Special Marking Function.
  756. * Multiple Dired directories:           Multiple Dired Directories.
  757. * Omitting additional files:            Omitting Variables.
  758. * Omitting dot files in Dired:          Omitting Examples.
  759. * Omitting Files in Dired:              Omitting Files in Dired.
  760. * Omitting RCS files in Dired:          Omitting Examples.
  761. * Omitting tib files in Dired:          Omitting Examples.
  762. * Passing GNU tar its `z' switch.:      Shell Command Guessing.
  763. * Perusing ls listings:                 Virtual Dired.
  764. * RCS files, how to omit them in Dired: Omitting Examples.
  765. * Reading mail.:                        Miscellaneous Commands.
  766. * Reading mail.:                        Miscellaneous Commands.
  767. * Redefined functions:                  Technical Details.
  768. * Relative symbolic links.:             Miscellaneous Commands.
  769. * Running info.:                        Miscellaneous Commands.
  770. * Running man.:                         Miscellaneous Commands.
  771. * Simultaneous visiting of several files: Advanced Mark Commands.
  772. * Tib files, how to omit them in Dired: Omitting Examples.
  773. * Toggling marks.:                      Miscellaneous Commands.
  774. * Virtual Dired:                        Virtual Dired.
  775. * Visiting a file mentioned in a buffer: Find File At Point.
  776. * Visiting several files at once:       Advanced Mark Commands.
  777. * Working directory:                    Multiple Dired Directories.
  778. File: dired-x,  Node: Command Index,  Next: Key Index,  Prev: Concept Index,  Up: Top
  779. Function Index
  780. **************
  781. * Menu:
  782. * default-directory:                    Multiple Dired Directories.
  783. * dired-clean-patch:                    Advanced Cleaning Functions.
  784. * dired-clean-tex:                      Advanced Cleaning Functions.
  785. * dired-copy-filename-as-kill:          Miscellaneous Commands.
  786. * dired-do-find-marked-files:           Advanced Mark Commands.
  787. * dired-do-relative-symlink:            Miscellaneous Commands.
  788. * dired-do-relative-symlink-regexp:     Miscellaneous Commands.
  789. * dired-do-toggle:                      Miscellaneous Commands.
  790. * dired-flag-extension:                 Advanced Mark Commands.
  791. * dired-goto-file:                      Miscellaneous Commands.
  792. * dired-goto-subdir:                    Miscellaneous Commands.
  793. * dired-info:                           Miscellaneous Commands.
  794. * dired-jump:                           Miscellaneous Commands.
  795. * dired-jump-other-window:              Miscellaneous Commands.
  796. * dired-man:                            Miscellaneous Commands.
  797. * dired-mark-extension:                 Advanced Mark Commands.
  798. * dired-mark-sexp:                      Special Marking Function.
  799. * dired-omit-here-always:               Omitting Variables.
  800. * dired-omit-toggle:                    Omitting Files in Dired.
  801. * dired-rmail:                          Miscellaneous Commands.
  802. * dired-smart-shell-command:            Miscellaneous Commands.
  803. * dired-very-clean-tex:                 Advanced Cleaning Functions.
  804. * dired-virtual:                        Virtual Dired.
  805. * dired-virtual-mode:                   Virtual Dired.
  806. * dired-virtual-revert:                 Virtual Dired.
  807. * dired-vm:                             Miscellaneous Commands.
  808. * dired-x-bind-find-file:               Find File At Point.
  809. * dired-x-find-file:                    Find File At Point.
  810. * dired-x-find-file-other-window:       Find File At Point.
  811. * dired-x-submit-report:                Bugs.
  812. * shell-command:                        Miscellaneous Commands.
  813. File: dired-x,  Node: Key Index,  Next: Variable Index,  Prev: Command Index,  Up: Top
  814. Key Index
  815. *********
  816. * Menu:
  817. * %Y:                                   Miscellaneous Commands.
  818. * C-x 4 C-f:                            Find File At Point.
  819. * C-x 4 C-j:                            Miscellaneous Commands.
  820. * C-x C-f:                              Find File At Point.
  821. * C-x C-j:                              Miscellaneous Commands.
  822. * F:                                    Advanced Mark Commands.
  823. * g:                                    Virtual Dired.
  824. * I:                                    Miscellaneous Commands.
  825. * M-!:                                  Miscellaneous Commands.
  826. * M-(:                                  Special Marking Function.
  827. * M-G:                                  Miscellaneous Commands.
  828. * M-g:                                  Miscellaneous Commands.
  829. * M-o:                                  Omitting Files in Dired.
  830. * N:                                    Miscellaneous Commands.
  831. * T:                                    Miscellaneous Commands.
  832. * V:                                    Miscellaneous Commands.
  833. * w:                                    Miscellaneous Commands.
  834. * Y:                                    Miscellaneous Commands.
  835. File: dired-x,  Node: Variable Index,  Prev: Key Index,  Up: Top
  836. Variable Index
  837. **************
  838. * Menu:
  839. * auto-mode-alist:                      Virtual Dired.
  840. * default-directory-alist:              Multiple Dired Directories.
  841. * dired-bibtex-unclean-extensions:      Advanced Cleaning Variables.
  842. * dired-bind-info:                      Miscellaneous Commands.
  843. * dired-bind-jump:                      Miscellaneous Commands.
  844. * dired-bind-man:                       Miscellaneous Commands.
  845. * dired-bind-vm:                        Miscellaneous Commands.
  846. * dired-enable-local-variables:         Local Variables.
  847. * dired-enable-local-variables:         Local Variables.
  848. * dired-find-subdir:                    Miscellaneous Commands.
  849. * dired-guess-shell-alist-default:      Shell Command Guessing.
  850. * dired-guess-shell-alist-user:         Shell Command Guessing.
  851. * dired-guess-shell-gnutar:             Shell Command Guessing.
  852. * dired-guess-shell-gzip-quiet:         Shell Command Guessing.
  853. * dired-guess-shell-znew-switches nil:  Shell Command Guessing.
  854. * dired-latex-unclean-extensions:       Advanced Cleaning Variables.
  855. * dired-local-variables-file:           Local Variables.
  856. * dired-local-variables-file:           Local Variables.
  857. * dired-marked-files:                   Miscellaneous Commands.
  858. * dired-omit-extensions:                Omitting Variables.
  859. * dired-omit-files:                     Omitting Variables.
  860. * dired-omit-files-p:                   Omitting Variables.
  861. * dired-omit-localp:                    Omitting Variables.
  862. * dired-omit-marker-char:               Omitting Variables.
  863. * dired-patch-unclean-extensions:       Advanced Cleaning Variables.
  864. * dired-shell-command-history nil:      Shell Command Guessing.
  865. * dired-tex-unclean-extensions:         Advanced Cleaning Variables.
  866. * dired-texinfo-unclean-extensions:     Advanced Cleaning Variables.
  867. * dired-vm-read-only-folders:           Miscellaneous Commands.
  868. * dired-x-hands-off-my-keys:            Find File At Point.
  869. Tag Table:
  870. Node: Copyright
  871. Node: Top
  872. Node: Introduction
  873. Node: Features
  874. Node: Technical Details
  875. Node: Installation
  876. Node: Optional Installation Dired Jump
  877. Node: Optional Installation File At Point
  878. Node: Special Notes
  879. Node: Omitting Files in Dired
  880. 10559
  881. Node: Omitting Variables
  882. 12081
  883. Node: Omitting Examples
  884. 15390
  885. Node: Omitting Technical
  886. 16609
  887. Node: Local Variables
  888. 17025
  889. Node: Shell Command Guessing
  890. 18892
  891. Node: Virtual Dired
  892. 21883
  893. Node: Advanced Mark Commands
  894. 23410
  895. Node: Advanced Cleaning Functions
  896. 24767
  897. Node: Advanced Cleaning Variables
  898. 25594
  899. Node: Special Marking Function
  900. 26714
  901. Node: Multiple Dired Directories
  902. 28307
  903. Node: Find File At Point
  904. 29476
  905. Node: Miscellaneous Commands
  906. 32237
  907. Node: Bugs
  908. 37244
  909. Node: Concept Index
  910. 37842
  911. Node: Command Index
  912. 40415
  913. Node: Key Index
  914. 42490
  915. Node: Variable Index
  916. 43749
  917. End Tag Table
  918.